package ch16_applets_images_sounds;
import java.awt.*;
import java.applet.*;
import javax.swing.*;
public class JEventImage extends JApplet
{
   Image eventLogo;
   final int WIDTH = 328;
   final int HEIGHT = 104;
   public void init()
   {
      eventLogo = getImage(getCodeBase(), "EventHandlers.png");
   }
   public void paint(Graphics g)
   {
      super.paint(g);
      // Draw image at its natural size 328 X 104
      g.drawImage(eventLogo, 0, 0, this);
      // Draw the image scaled - twice as large
      g.drawImage(eventLogo, 0, HEIGHT, WIDTH * 2, HEIGHT * 2, this);
   }
}
